package lab02.test11;

public class Square extends Rectangle {
    double length;
    @Override
    public void printMyWay() {
        System.out.println("bianchang:" + length);
        System.out.println("mianji"+ length*length);
        System.out.println("zhouchang:" + length*4);
        System.out.println("duijiaoxian:"+diagonat());
    }

    double diagonat(){
        return Math.sqrt(length*length*2);

    }
}
